<template>
	<view class="container">
		<view class="detailBody">
			<view class="titleContainer">
				<text class="title">查询结果</text>
			</view>
			<view class="detail">
				<view>
					<text>举报编号：<text>{{item.reportNumber}}</text></text>
				</view>
				<view>
					<text>举报类型：<text>{{item.reportType===1?'实名举报':'匿名举报'}}</text></text>
				</view>
				<view style="margin-left: -0.9em;">
					<text>被举报类型：<text>{{item.reportedType===1?'网站':(item.reportedType===2?'APP':'网络平台')}}</text></text>
				</view>
				<view>
					<text>危害类型：<text>{{this.harmTypeName}}</text></text>
				</view>
				<view>
					<text>网站名称：<text>{{item.name}}</text></text>
				</view>
				<view>
					<text>详细网址：<text style="text-align: center;">{{item.extraContent}}</text></text>
				</view>
				<view>
					<text>举报内容：<text>{{item.reportContent}}</text></text>
				</view>
				<view style="margin-left: 1.75em;">
					<text>状态：<text>{{this.status}}</text></text>
				</view>
				<view>
					<text>受理结果：<text>{{item.acceptorReason===null?'未受理':item.acceptorReason}}</text></text>
				</view>
				<view>
					<text>审批结果：<text>{{item.reason===null?'未审批':item.reason}}</text></text>
				</view>
				<view>
					<text>处理结果：<text>{{item.handlerReason===null?'未处理':item.handlerReason}}</text></text>
				</view>
				<view>
					<text>创建时间：<text>{{item.createTime}}</text></text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {HARM_TYPE_LIST,WORK_ORDER_STATE} from '../../utils/constant.js'
	export default {
		name:"detail",
		props:{
			item:{
				type:Object,
				default(){
					return{
						acceptorId: null,
						acceptorReason: null,
						auditorId: null,
						count: null,
						createBy: 0,
						createTime: "2023-07-07 00:26:37",
						endTime: null,
						extraContent: "111",
						fileIds: null,
						handlerId: null,
						handlerReason: null,
						harmType: 1,
						id: "1676991048058912769",
						isDeleted: "0",
						locationId: null,
						name: "baidu",
						orgId: null,
						platformId: 1,
						reason: null,
						reportContent: "111",
						reportNumber: "2023-07-070001",
						reportStatue: 0,
						reportType: 2,
						reportedType: 1,
						reporterEmail: null,
						reporterId: null,
						reporterName: null,
						reporterPhone: null,
						reporterSex: null,
						updateBy: 0,
						updateTime: "2023-07-07 00:26:37",
						webAddress: "",
					}
				}
			}
		},
		created() {
			this.init()
		},
		data() {
			return {
				harmTypeName:'',
				status:''
			};
		},
		methods:{
			init(){
				for(let i =0 ;i<HARM_TYPE_LIST.length;i++){
					if(this.$props.item.harmType===HARM_TYPE_LIST[i].value){
						this.harmTypeName=HARM_TYPE_LIST[i].label;
					}
				}
				for(let j =0;j<WORK_ORDER_STATE.length;j++){
					if(this.$props.item.reportStatue===WORK_ORDER_STATE[j].value){
						this.status=WORK_ORDER_STATE[j].label
					}
				}
			}
		}
	}
</script>

<style scoped lang="scss">
.container{
		.detailBody{
			.titleContainer{
				border-bottom: 1px solid lightgrey;
				padding-bottom: 7px;
				margin: 7px 18px;
				.title{
					font-weight: bold;
					width: 96px;
					height: 33px;
					color: rgba(16, 16, 16, 1);
					font-size: 24px;
					text-align: left;
					font-family: PingFangSC-regular;
				}
			}
			.detail{
				margin: 30px 87px;
				text-align: left;
				view{
					width:272px;
					margin-bottom: 22px;
					text{
						color: rgba(16, 16, 16, 1);
						font-size: 14px;
						text-align: left;
						font-family: PingFangSC-regular;
						text{
							margin-left: 2.5em;
						}
					}
				}
				
			}
		}
	}
</style>